<script>
  let qa = [
    { value: "问题一", code: 1 },
    { value: "问题二", code: 2 },
    { value: "问题三", code: 3 },
    ];
  let selected = [];

  const changeSelect = ()=>{
    console.log(selected)
  }
</script>
<select multiple  bind:value={selected} on:change="{changeSelect}">
  {#each qa as item}
  <option value={item.code} >{item.value}</option>
  {/each}
</select>
